package com.tcredit.spider.web.controller;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.tcredit.spider.web.redis.RedisService;

@RestController
public class RedisController {

	protected final Logger logger = LogManager.getLogger(HelloController.class);

	@Autowired
	private RedisService redisService;
	
	@RequestMapping(value = "/redis", method = RequestMethod.GET )
	public String useRedis() {
		redisService.setKey("testRedisYouCanDel","testRedisYouCanDel1233211234567");
        logger.info(redisService.getValue("testRedisYouCanDel"));
        return null;
	}
	
}
